3.794 \(\int \frac {\sec ^2(c+d x) (B \sec (c+d x)+C \sec ^2(c+d x))}{a+b \sec (c+d x)} \, dx\)
Optimal. Leaf size=143 \[ \frac {2 a^2 (b B-a C) \tanh ^{-1}\left (\frac {\sqrt {a-b} \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a+b}}\right )}{b^3 d \sqrt {a-b} \sqrt {a+b}}-\frac {\left (-2 a^2 C+2 a b B-b^2 C\right ) \tanh ^{-1}(\sin (c+d x))}{2 b^3 d}+\frac {(b B-a C) \tan (c+d x)}{b^2 d}+\frac {C \tan (c+d x) \sec (c+d x)}{2 b d} \]
[Out]
-1/2*(2*B*a*b-2*C*a^2-C*b^2)*arctanh(sin(d*x+c))/b^3/d+2*a^2*(B*b-C*a)*arctanh((a-b)^(1/2)*tan(1/2*d*x+1/2*c)/
(a+b)^(1/2))/b^3/d/(a-b)^(1/2)/(a+b)^(1/2)+(B*b-C*a)*tan(d*x+c)/b^2/d+1/2*C*sec(d*x+c)*tan(d*x+c)/b/d
________________________________________________________________________________________
Rubi [A] time = 0.45, antiderivative size = 143, normalized size of antiderivative = 1.00,
number of steps used = 8, number of rules used = 8, integrand size = 40, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used =
{4072, 4033, 4082, 3998, 3770, 3831, 2659, 208} \[ -\frac {\left (-2 a^2 C+2 a b B-b^2 C\right ) \tanh ^{-1}(\sin (c+d x))}{2 b^3 d}+\frac {2 a^2 (b B-a C) \tanh ^{-1}\left (\frac {\sqrt {a-b} \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a+b}}\right )}{b^3 d \sqrt {a-b} \sqrt {a+b}}+\frac {(b B-a C) \tan (c+d x)}{b^2 d}+\frac {C \tan (c+d x) \sec (c+d x)}{2 b d} \]
Antiderivative was successfully verified.
[In]
Int[(Sec[c + d*x]^2*(B*Sec[c + d*x] + C*Sec[c + d*x]^2))/(a + b*Sec[c + d*x]),x]
[Out]
-((2*a*b*B - 2*a^2*C - b^2*C)*ArcTanh[Sin[c + d*x]])/(2*b^3*d) + (2*a^2*(b*B - a*C)*ArcTanh[(Sqrt[a - b]*Tan[(
c + d*x)/2])/Sqrt[a + b]])/(Sqrt[a - b]*b^3*Sqrt[a + b]*d) + ((b*B - a*C)*Tan[c + d*x])/(b^2*d) + (C*Sec[c + d
*x]*Tan[c + d*x])/(2*b*d)
Rule 208
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-(a/b), 2]*ArcTanh[x/Rt[-(a/b), 2]])/a, x] /; FreeQ[{a,
b}, x] && NegQ[a/b]
Rule 2659
Int[((a_) + (b_.)*sin[Pi/2 + (c_.) + (d_.)*(x_)])^(-1), x_Symbol] :> With[{e = FreeFactors[Tan[(c + d*x)/2], x
]}, Dist[(2*e)/d, Subst[Int[1/(a + b + (a - b)*e^2*x^2), x], x, Tan[(c + d*x)/2]/e], x]] /; FreeQ[{a, b, c, d}
, x] && NeQ[a^2 - b^2, 0]
Rule 3770
Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]
Rule 3831
Int[csc[(e_.) + (f_.)*(x_)]/(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_)), x_Symbol] :> Dist[1/b, Int[1/(1 + (a*Sin[e
+ f*x])/b), x], x] /; FreeQ[{a, b, e, f}, x] && NeQ[a^2 - b^2, 0]
Rule 3998
Int[(csc[(e_.) + (f_.)*(x_)]*(csc[(e_.) + (f_.)*(x_)]*(B_.) + (A_)))/(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_)), x
_Symbol] :> Dist[B/b, Int[Csc[e + f*x], x], x] + Dist[(A*b - a*B)/b, Int[Csc[e + f*x]/(a + b*Csc[e + f*x]), x]
, x] /; FreeQ[{a, b, e, f, A, B}, x] && NeQ[A*b - a*B, 0]
Rule 4033
Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_)*(csc[(e_.) + (f_.)*(x_)]*
(B_.) + (A_)), x_Symbol] :> -Simp[(B*d^2*Cot[e + f*x]*(a + b*Csc[e + f*x])^(m + 1)*(d*Csc[e + f*x])^(n - 2))/(
b*f*(m + n)), x] + Dist[d^2/(b*(m + n)), Int[(a + b*Csc[e + f*x])^m*(d*Csc[e + f*x])^(n - 2)*Simp[a*B*(n - 2)
+ B*b*(m + n - 1)*Csc[e + f*x] + (A*b*(m + n) - a*B*(n - 1))*Csc[e + f*x]^2, x], x], x] /; FreeQ[{a, b, d, e,
f, A, B, m}, x] && NeQ[A*b - a*B, 0] && NeQ[a^2 - b^2, 0] && GtQ[n, 1] && NeQ[m + n, 0] && !IGtQ[m, 1]
Rule 4072
Int[((a_.) + csc[(e_.) + (f_.)*(x_)]*(b_.))^(m_.)*((A_.) + csc[(e_.) + (f_.)*(x_)]*(B_.) + csc[(e_.) + (f_.)*(
x_)]^2*(C_.))*((c_.) + csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_.), x_Symbol] :> Dist[1/b^2, Int[(a + b*Csc[e + f*x])
^(m + 1)*(c + d*Csc[e + f*x])^n*(b*B - a*C + b*C*Csc[e + f*x]), x], x] /; FreeQ[{a, b, c, d, e, f, A, B, C, m,
n}, x] && EqQ[A*b^2 - a*b*B + a^2*C, 0]
Rule 4082
Int[csc[(e_.) + (f_.)*(x_)]*((A_.) + csc[(e_.) + (f_.)*(x_)]*(B_.) + csc[(e_.) + (f_.)*(x_)]^2*(C_.))*(csc[(e_
.) + (f_.)*(x_)]*(b_.) + (a_))^(m_), x_Symbol] :> -Simp[(C*Cot[e + f*x]*(a + b*Csc[e + f*x])^(m + 1))/(b*f*(m
+ 2)), x] + Dist[1/(b*(m + 2)), Int[Csc[e + f*x]*(a + b*Csc[e + f*x])^m*Simp[b*A*(m + 2) + b*C*(m + 1) + (b*B*
(m + 2) - a*C)*Csc[e + f*x], x], x], x] /; FreeQ[{a, b, e, f, A, B, C, m}, x] && !LtQ[m, -1]
Rubi steps
\begin {align*} \int \frac {\sec ^2(c+d x) \left (B \sec (c+d x)+C \sec ^2(c+d x)\right )}{a+b \sec (c+d x)} \, dx &=\int \frac {\sec ^3(c+d x) (B+C \sec (c+d x))}{a+b \sec (c+d x)} \, dx\\ &=\frac {C \sec (c+d x) \tan (c+d x)}{2 b d}+\frac {\int \frac {\sec (c+d x) \left (a C+b C \sec (c+d x)+2 (b B-a C) \sec ^2(c+d x)\right )}{a+b \sec (c+d x)} \, dx}{2 b}\\ &=\frac {(b B-a C) \tan (c+d x)}{b^2 d}+\frac {C \sec (c+d x) \tan (c+d x)}{2 b d}+\frac {\int \frac {\sec (c+d x) \left (a b C-\left (2 a b B-2 a^2 C-b^2 C\right ) \sec (c+d x)\right )}{a+b \sec (c+d x)} \, dx}{2 b^2}\\ &=\frac {(b B-a C) \tan (c+d x)}{b^2 d}+\frac {C \sec (c+d x) \tan (c+d x)}{2 b d}+\frac {\left (a^2 (b B-a C)\right ) \int \frac {\sec (c+d x)}{a+b \sec (c+d x)} \, dx}{b^3}-\frac {\left (2 a b B-2 a^2 C-b^2 C\right ) \int \sec (c+d x) \, dx}{2 b^3}\\ &=-\frac {\left (2 a b B-2 a^2 C-b^2 C\right ) \tanh ^{-1}(\sin (c+d x))}{2 b^3 d}+\frac {(b B-a C) \tan (c+d x)}{b^2 d}+\frac {C \sec (c+d x) \tan (c+d x)}{2 b d}+\frac {\left (a^2 (b B-a C)\right ) \int \frac {1}{1+\frac {a \cos (c+d x)}{b}} \, dx}{b^4}\\ &=-\frac {\left (2 a b B-2 a^2 C-b^2 C\right ) \tanh ^{-1}(\sin (c+d x))}{2 b^3 d}+\frac {(b B-a C) \tan (c+d x)}{b^2 d}+\frac {C \sec (c+d x) \tan (c+d x)}{2 b d}+\frac {\left (2 a^2 (b B-a C)\right ) \operatorname {Subst}\left (\int \frac {1}{1+\frac {a}{b}+\left (1-\frac {a}{b}\right ) x^2} \, dx,x,\tan \left (\frac {1}{2} (c+d x)\right )\right )}{b^4 d}\\ &=-\frac {\left (2 a b B-2 a^2 C-b^2 C\right ) \tanh ^{-1}(\sin (c+d x))}{2 b^3 d}+\frac {2 a^2 (b B-a C) \tanh ^{-1}\left (\frac {\sqrt {a-b} \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a+b}}\right )}{\sqrt {a-b} b^3 \sqrt {a+b} d}+\frac {(b B-a C) \tan (c+d x)}{b^2 d}+\frac {C \sec (c+d x) \tan (c+d x)}{2 b d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] time = 2.24, size = 300, normalized size = 2.10 \[ \frac {\frac {8 a^2 (a C-b B) \tanh ^{-1}\left (\frac {(b-a) \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a^2-b^2}}\right )}{\sqrt {a^2-b^2}}-2 \left (2 a^2 C-2 a b B+b^2 C\right ) \log \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )+2 \left (2 a^2 C-2 a b B+b^2 C\right ) \log \left (\sin \left (\frac {1}{2} (c+d x)\right )+\cos \left (\frac {1}{2} (c+d x)\right )\right )+\frac {4 b (b B-a C) \sin \left (\frac {1}{2} (c+d x)\right )}{\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )}+\frac {4 b (b B-a C) \sin \left (\frac {1}{2} (c+d x)\right )}{\sin \left (\frac {1}{2} (c+d x)\right )+\cos \left (\frac {1}{2} (c+d x)\right )}+\frac {b^2 C}{\left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )^2}-\frac {b^2 C}{\left (\sin \left (\frac {1}{2} (c+d x)\right )+\cos \left (\frac {1}{2} (c+d x)\right )\right )^2}}{4 b^3 d} \]
Antiderivative was successfully verified.
[In]
Integrate[(Sec[c + d*x]^2*(B*Sec[c + d*x] + C*Sec[c + d*x]^2))/(a + b*Sec[c + d*x]),x]
[Out]
((8*a^2*(-(b*B) + a*C)*ArcTanh[((-a + b)*Tan[(c + d*x)/2])/Sqrt[a^2 - b^2]])/Sqrt[a^2 - b^2] - 2*(-2*a*b*B + 2
*a^2*C + b^2*C)*Log[Cos[(c + d*x)/2] - Sin[(c + d*x)/2]] + 2*(-2*a*b*B + 2*a^2*C + b^2*C)*Log[Cos[(c + d*x)/2]
+ Sin[(c + d*x)/2]] + (b^2*C)/(Cos[(c + d*x)/2] - Sin[(c + d*x)/2])^2 + (4*b*(b*B - a*C)*Sin[(c + d*x)/2])/(C
os[(c + d*x)/2] - Sin[(c + d*x)/2]) - (b^2*C)/(Cos[(c + d*x)/2] + Sin[(c + d*x)/2])^2 + (4*b*(b*B - a*C)*Sin[(
c + d*x)/2])/(Cos[(c + d*x)/2] + Sin[(c + d*x)/2]))/(4*b^3*d)
________________________________________________________________________________________
fricas [B] time = 5.29, size = 609, normalized size = 4.26 \[ \left [-\frac {2 \, {\left (C a^{3} - B a^{2} b\right )} \sqrt {a^{2} - b^{2}} \cos \left (d x + c\right )^{2} \log \left (\frac {2 \, a b \cos \left (d x + c\right ) - {\left (a^{2} - 2 \, b^{2}\right )} \cos \left (d x + c\right )^{2} + 2 \, \sqrt {a^{2} - b^{2}} {\left (b \cos \left (d x + c\right ) + a\right )} \sin \left (d x + c\right ) + 2 \, a^{2} - b^{2}}{a^{2} \cos \left (d x + c\right )^{2} + 2 \, a b \cos \left (d x + c\right ) + b^{2}}\right ) - {\left (2 \, C a^{4} - 2 \, B a^{3} b - C a^{2} b^{2} + 2 \, B a b^{3} - C b^{4}\right )} \cos \left (d x + c\right )^{2} \log \left (\sin \left (d x + c\right ) + 1\right ) + {\left (2 \, C a^{4} - 2 \, B a^{3} b - C a^{2} b^{2} + 2 \, B a b^{3} - C b^{4}\right )} \cos \left (d x + c\right )^{2} \log \left (-\sin \left (d x + c\right ) + 1\right ) - 2 \, {\left (C a^{2} b^{2} - C b^{4} - 2 \, {\left (C a^{3} b - B a^{2} b^{2} - C a b^{3} + B b^{4}\right )} \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )}{4 \, {\left (a^{2} b^{3} - b^{5}\right )} d \cos \left (d x + c\right )^{2}}, -\frac {4 \, {\left (C a^{3} - B a^{2} b\right )} \sqrt {-a^{2} + b^{2}} \arctan \left (-\frac {\sqrt {-a^{2} + b^{2}} {\left (b \cos \left (d x + c\right ) + a\right )}}{{\left (a^{2} - b^{2}\right )} \sin \left (d x + c\right )}\right ) \cos \left (d x + c\right )^{2} - {\left (2 \, C a^{4} - 2 \, B a^{3} b - C a^{2} b^{2} + 2 \, B a b^{3} - C b^{4}\right )} \cos \left (d x + c\right )^{2} \log \left (\sin \left (d x + c\right ) + 1\right ) + {\left (2 \, C a^{4} - 2 \, B a^{3} b - C a^{2} b^{2} + 2 \, B a b^{3} - C b^{4}\right )} \cos \left (d x + c\right )^{2} \log \left (-\sin \left (d x + c\right ) + 1\right ) - 2 \, {\left (C a^{2} b^{2} - C b^{4} - 2 \, {\left (C a^{3} b - B a^{2} b^{2} - C a b^{3} + B b^{4}\right )} \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )}{4 \, {\left (a^{2} b^{3} - b^{5}\right )} d \cos \left (d x + c\right )^{2}}\right ] \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
integrate(sec(d*x+c)^2*(B*sec(d*x+c)+C*sec(d*x+c)^2)/(a+b*sec(d*x+c)),x, algorithm="fricas")
[Out]
[-1/4*(2*(C*a^3 - B*a^2*b)*sqrt(a^2 - b^2)*cos(d*x + c)^2*log((2*a*b*cos(d*x + c) - (a^2 - 2*b^2)*cos(d*x + c)
^2 + 2*sqrt(a^2 - b^2)*(b*cos(d*x + c) + a)*sin(d*x + c) + 2*a^2 - b^2)/(a^2*cos(d*x + c)^2 + 2*a*b*cos(d*x +
c) + b^2)) - (2*C*a^4 - 2*B*a^3*b - C*a^2*b^2 + 2*B*a*b^3 - C*b^4)*cos(d*x + c)^2*log(sin(d*x + c) + 1) + (2*C
*a^4 - 2*B*a^3*b - C*a^2*b^2 + 2*B*a*b^3 - C*b^4)*cos(d*x + c)^2*log(-sin(d*x + c) + 1) - 2*(C*a^2*b^2 - C*b^4
- 2*(C*a^3*b - B*a^2*b^2 - C*a*b^3 + B*b^4)*cos(d*x + c))*sin(d*x + c))/((a^2*b^3 - b^5)*d*cos(d*x + c)^2), -
1/4*(4*(C*a^3 - B*a^2*b)*sqrt(-a^2 + b^2)*arctan(-sqrt(-a^2 + b^2)*(b*cos(d*x + c) + a)/((a^2 - b^2)*sin(d*x +
c)))*cos(d*x + c)^2 - (2*C*a^4 - 2*B*a^3*b - C*a^2*b^2 + 2*B*a*b^3 - C*b^4)*cos(d*x + c)^2*log(sin(d*x + c) +
1) + (2*C*a^4 - 2*B*a^3*b - C*a^2*b^2 + 2*B*a*b^3 - C*b^4)*cos(d*x + c)^2*log(-sin(d*x + c) + 1) - 2*(C*a^2*b
^2 - C*b^4 - 2*(C*a^3*b - B*a^2*b^2 - C*a*b^3 + B*b^4)*cos(d*x + c))*sin(d*x + c))/((a^2*b^3 - b^5)*d*cos(d*x
+ c)^2)]
________________________________________________________________________________________
giac [B] time = 0.34, size = 269, normalized size = 1.88 \[ \frac {\frac {{\left (2 \, C a^{2} - 2 \, B a b + C b^{2}\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right )}{b^{3}} - \frac {{\left (2 \, C a^{2} - 2 \, B a b + C b^{2}\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right )}{b^{3}} - \frac {4 \, {\left (C a^{3} - B a^{2} b\right )} {\left (\pi \left \lfloor \frac {d x + c}{2 \, \pi } + \frac {1}{2} \right \rfloor \mathrm {sgn}\left (-2 \, a + 2 \, b\right ) + \arctan \left (-\frac {a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{\sqrt {-a^{2} + b^{2}}}\right )\right )}}{\sqrt {-a^{2} + b^{2}} b^{3}} + \frac {2 \, {\left (2 \, C a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 2 \, B b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + C b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 2 \, C a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 2 \, B b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + C b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right )}^{2} b^{2}}}{2 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
integrate(sec(d*x+c)^2*(B*sec(d*x+c)+C*sec(d*x+c)^2)/(a+b*sec(d*x+c)),x, algorithm="giac")
[Out]
1/2*((2*C*a^2 - 2*B*a*b + C*b^2)*log(abs(tan(1/2*d*x + 1/2*c) + 1))/b^3 - (2*C*a^2 - 2*B*a*b + C*b^2)*log(abs(
tan(1/2*d*x + 1/2*c) - 1))/b^3 - 4*(C*a^3 - B*a^2*b)*(pi*floor(1/2*(d*x + c)/pi + 1/2)*sgn(-2*a + 2*b) + arcta
n(-(a*tan(1/2*d*x + 1/2*c) - b*tan(1/2*d*x + 1/2*c))/sqrt(-a^2 + b^2)))/(sqrt(-a^2 + b^2)*b^3) + 2*(2*C*a*tan(
1/2*d*x + 1/2*c)^3 - 2*B*b*tan(1/2*d*x + 1/2*c)^3 + C*b*tan(1/2*d*x + 1/2*c)^3 - 2*C*a*tan(1/2*d*x + 1/2*c) +
2*B*b*tan(1/2*d*x + 1/2*c) + C*b*tan(1/2*d*x + 1/2*c))/((tan(1/2*d*x + 1/2*c)^2 - 1)^2*b^2))/d
________________________________________________________________________________________
maple [B] time = 0.56, size = 410, normalized size = 2.87 \[ \frac {2 a^{2} \arctanh \left (\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right ) \left (a -b \right )}{\sqrt {\left (a -b \right ) \left (a +b \right )}}\right ) B}{d \,b^{2} \sqrt {\left (a -b \right ) \left (a +b \right )}}-\frac {2 a^{3} \arctanh \left (\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right ) \left (a -b \right )}{\sqrt {\left (a -b \right ) \left (a +b \right )}}\right ) C}{d \,b^{3} \sqrt {\left (a -b \right ) \left (a +b \right )}}+\frac {C}{2 d b \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{2}}-\frac {B}{d b \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}+\frac {C a}{d \,b^{2} \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}+\frac {C}{2 d b \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}+\frac {\ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right ) B a}{d \,b^{2}}-\frac {\ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right ) a^{2} C}{d \,b^{3}}-\frac {\ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right ) C}{2 d b}-\frac {C}{2 d b \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{2}}-\frac {B}{d b \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}+\frac {C a}{d \,b^{2} \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}+\frac {C}{2 d b \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}-\frac {\ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right ) B a}{d \,b^{2}}+\frac {\ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right ) a^{2} C}{d \,b^{3}}+\frac {\ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right ) C}{2 d b} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
int(sec(d*x+c)^2*(B*sec(d*x+c)+C*sec(d*x+c)^2)/(a+b*sec(d*x+c)),x)
[Out]
2/d*a^2/b^2/((a-b)*(a+b))^(1/2)*arctanh(tan(1/2*d*x+1/2*c)*(a-b)/((a-b)*(a+b))^(1/2))*B-2/d*a^3/b^3/((a-b)*(a+
b))^(1/2)*arctanh(tan(1/2*d*x+1/2*c)*(a-b)/((a-b)*(a+b))^(1/2))*C+1/2/d/b/(tan(1/2*d*x+1/2*c)-1)^2*C-1/d/b/(ta
n(1/2*d*x+1/2*c)-1)*B+1/d/b^2/(tan(1/2*d*x+1/2*c)-1)*C*a+1/2/d/b/(tan(1/2*d*x+1/2*c)-1)*C+1/d/b^2*ln(tan(1/2*d
*x+1/2*c)-1)*B*a-1/d/b^3*ln(tan(1/2*d*x+1/2*c)-1)*a^2*C-1/2/d/b*ln(tan(1/2*d*x+1/2*c)-1)*C-1/2/d/b/(tan(1/2*d*
x+1/2*c)+1)^2*C-1/d/b/(tan(1/2*d*x+1/2*c)+1)*B+1/d/b^2/(tan(1/2*d*x+1/2*c)+1)*C*a+1/2/d/b/(tan(1/2*d*x+1/2*c)+
1)*C-1/d/b^2*ln(tan(1/2*d*x+1/2*c)+1)*B*a+1/d/b^3*ln(tan(1/2*d*x+1/2*c)+1)*a^2*C+1/2/d/b*ln(tan(1/2*d*x+1/2*c)
+1)*C
________________________________________________________________________________________
maxima [F(-2)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: ValueError} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
integrate(sec(d*x+c)^2*(B*sec(d*x+c)+C*sec(d*x+c)^2)/(a+b*sec(d*x+c)),x, algorithm="maxima")
[Out]
Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'a
ssume' command before evaluation *may* help (example of legal syntax is 'assume(4*a^2-4*b^2>0)', see `assume?`
for more details)Is 4*a^2-4*b^2 positive or negative?
________________________________________________________________________________________
mupad [B] time = 8.02, size = 4047, normalized size = 28.30 \[ \text {result too large to display} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
int((B/cos(c + d*x) + C/cos(c + d*x)^2)/(cos(c + d*x)^2*(a + b/cos(c + d*x))),x)
[Out]
(C*a*sin(2*c + 2*d*x))/(2*d*(a^2 - b^2)*(cos(2*c + 2*d*x)/2 + 1/2)) - (B*b*sin(2*c + 2*d*x))/(2*d*(a^2 - b^2)*
(cos(2*c + 2*d*x)/2 + 1/2)) - (C*b*sin(c + d*x))/(2*d*(a^2 - b^2)*(cos(2*c + 2*d*x)/2 + 1/2)) - (B*a*atan((sin
(c/2 + (d*x)/2)*1i)/cos(c/2 + (d*x)/2))*1i)/(d*(a^2 - b^2)*(cos(2*c + 2*d*x)/2 + 1/2)) + (C*b*atan((sin(c/2 +
(d*x)/2)*1i)/cos(c/2 + (d*x)/2))*1i)/(2*d*(a^2 - b^2)*(cos(2*c + 2*d*x)/2 + 1/2)) + (B*a^3*atan((sin(c/2 + (d*
x)/2)*1i)/cos(c/2 + (d*x)/2))*1i)/(b^2*d*(a^2 - b^2)*(cos(2*c + 2*d*x)/2 + 1/2)) + (C*a^2*atan((sin(c/2 + (d*x
)/2)*1i)/cos(c/2 + (d*x)/2))*1i)/(2*b*d*(a^2 - b^2)*(cos(2*c + 2*d*x)/2 + 1/2)) - (C*a^4*atan((sin(c/2 + (d*x)
/2)*1i)/cos(c/2 + (d*x)/2))*1i)/(b^3*d*(a^2 - b^2)*(cos(2*c + 2*d*x)/2 + 1/2)) + (B*a^2*sin(2*c + 2*d*x))/(2*b
*d*(a^2 - b^2)*(cos(2*c + 2*d*x)/2 + 1/2)) - (C*a^3*sin(2*c + 2*d*x))/(2*b^2*d*(a^2 - b^2)*(cos(2*c + 2*d*x)/2
+ 1/2)) - (B*a*atan((sin(c/2 + (d*x)/2)*1i)/cos(c/2 + (d*x)/2))*cos(2*c + 2*d*x)*1i)/(d*(a^2 - b^2)*(c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b^2)^(1/2) + 3*C^2*a^5*b^4*sin(c/2 + (d*x)/2)*(a^2 - b^2)^(1/2) + 8*C^2*a^7*b^2*sin(c/2 + (d*x)/2
)*(a^2 - b^2)^(1/2) - 4*B*C*a*b^8*sin(c/2 + (d*x)/2)*(a^2 - b^2)^(1/2) - 16*B*C*a^6*b*sin(c/2 + (d*x)/2)*(a^2
- b^2)^(3/2) + 16*B*C*a^8*b*sin(c/2 + (d*x)/2)*(a^2 - b^2)^(1/2) + 4*B*C*a^2*b^7*sin(c/2 + (d*x)/2)*(a^2 - b^2
)^(1/2) + 4*B*C*a^5*b^4*sin(c/2 + (d*x)/2)*(a^2 - b^2)^(1/2) - 20*B*C*a^6*b^3*sin(c/2 + (d*x)/2)*(a^2 - b^2)^(
1/2))*1i)/(cos(c/2 + (d*x)/2)*(a^2*b - b^3)*(C^2*b^7 + 4*B^2*a^2*b^5 - 4*B^2*a^4*b^3 + 2*C^2*a^2*b^5 - 3*C^2*a
^4*b^3 - 4*B*C*a*b^6 + 4*B*C*a^5*b^2)))*((a + b)*(a - b))^(1/2)*1i)/(b^3*d*(a^2 - b^2)*(cos(2*c + 2*d*x)/2 + 1
/2)) + (B*a^3*atan((sin(c/2 + (d*x)/2)*1i)/cos(c/2 + (d*x)/2))*cos(2*c + 2*d*x)*1i)/(b^2*d*(a^2 - b^2)*(cos(2*
c + 2*d*x)/2 + 1/2)) + (C*a^2*atan((sin(c/2 + (d*x)/2)*1i)/cos(c/2 + (d*x)/2))*cos(2*c + 2*d*x)*1i)/(2*b*d*(a^
2 - b^2)*(cos(2*c + 2*d*x)/2 + 1/2)) - (C*a^4*atan((sin(c/2 + (d*x)/2)*1i)/cos(c/2 + (d*x)/2))*cos(2*c + 2*d*x
)*1i)/(b^3*d*(a^2 - b^2)*(cos(2*c + 2*d*x)/2 + 1/2)) + (B*a^2*atan(((8*C^2*a^7*sin(c/2 + (d*x)/2)*(a^2 - b^2)^
(3/2) - 8*C^2*a^9*sin(c/2 + (d*x)/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*b^7*sin(c/2 + (d*x)/2)*(a^2 - b^2)^(1/2) + 4*B*C*a^5*b^4*sin(c/2
+ (d*x)/2)*(a^2 - b^2)^(1/2) - 20*B*C*a^6*b^3*sin(c/2 + (d*x)/2)*(a^2 - b^2)^(1/2))*1i)/(cos(c/2 + (d*x)/2)*(
a^2*b - b^3)*(C^2*b^7 + 4*B^2*a^2*b^5 - 4*B^2*a^4*b^3 + 2*C^2*a^2*b^5 - 3*C^2*a^4*b^3 - 4*B*C*a*b^6 + 4*B*C*a^
5*b^2)))*cos(2*c + 2*d*x)*((a + b)*(a - b))^(1/2)*1i)/(b^3*d*(a^2 - b^2)*(cos(2*c + 2*d*x)/2 + 1/2))
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\left (B + C \sec {\left (c + d x \right )}\right ) \sec ^{3}{\left (c + d x \right )}}{a + b \sec {\left (c + d x \right )}}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
integrate(sec(d*x+c)**2*(B*sec(d*x+c)+C*sec(d*x+c)**2)/(a+b*sec(d*x+c)),x)
[Out]
Integral((B + C*sec(c + d*x))*sec(c + d*x)**3/(a + b*sec(c + d*x)), x)
________________________________________________________________________________________